<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <meta name="keywords" content="scclui框架">
    <meta name="description" content="网站后台管理系统模版。">
    <title>首页</title>
    <link rel="stylesheet" href="{{asset('admin/css/sccl.css')}}">
    <link rel="stylesheet" type="text/css" href="{{asset('admin/skin/qingxin/skin.css')}}" id="layout-skin"/>
</head>

<body>
<div class="layout-admin">
    <header class="layout-header">
        <span class="header-logo">E住商</span>
        <a class="header-menu-btn" href="javascript:;"><i class="icon-font">&#xe600;</i></a>
        <ul class="header-bar">
            <li class="header-bar-role">{{$admin->type==1?"超级管理":"邀请码:".$admin->code}}<a href="javascript:;"></a></li>
            <li class="header-bar-nav">
                <a href="javascript:;">{{$admin->username}}<i class="icon-font" style="margin-left:5px;">&#xe60c;</i></a>
                <ul class="header-dropdown-menu">
                    <li><a href="javascript:;">个人信息</a></li>
                    <li><a href="javascript:;">切换账户</a></li>/
                    <li><a href="{{url("logout")}}" onclick="if(!confirm('退出登陆')) return false;">退出</a></li>
                </ul>
            </li>
            <li class="header-bar-nav">
                <a href="javascript:;" title="换肤"><i class="icon-font">&#xe608;</i></a>
                <ul class="header-dropdown-menu right dropdown-skin">
                    <li><a href="javascript:;" data-val="qingxin" title="清新">清新</a></li>
                    <li><a href="javascript:;" data-val="blue" title="蓝色">蓝色</a></li>
                    <li><a  href="javascript:;" data-val="molv" title="墨绿">墨绿</a></li>
                </ul>
            </li>
        </ul>
    </header>
    <aside class="layout-side">
        <ul class="side-menu">

        </ul>
    </aside>

    <div class="layout-side-arrow"><div class="layout-side-arrow-icon"><i class="icon-font">&#xe60d;</i></div></div>

    <section class="layout-main">
        <div class="layout-main-tab">
            <button class="tab-btn btn-left"><i class="icon-font">&#xe60e;</i></button>
            <nav class="tab-nav">
                <div class="tab-nav-content">
                    <a href="javascript:;" class="content-tab active" data-id="home.html">欢迎</a>
                </div>
            </nav>
            <button class="tab-btn btn-right"><i class="icon-font">&#xe60f;</i></button>
        </div>
        <div class="layout-main-body">
            <iframe class="body-iframe" name="iframe0" width="100%" height="99%" src="{{url('welcome')}}" frameborder="0" data-id="home.html" seamless></iframe>
        </div>
    </section>

</div>
<script type="text/javascript" src="{{asset('admin/lib/jquery-1.9.0.min.js')}}"></script>
<script type="text/javascript" src="{{asset('admin/js/sccl.js')}}"></script>
<script type="text/javascript" src="{{asset('admin/js/sccl-util.js')}}"></script>


</body>
</html>

<script>
    /*
     初始化加载
     */
    $(function(){
        /*获取皮肤*/
        getSkinByCookie();
        /*菜单json*/
                @if($admin->type==1 )

        var menu = [{"id":"1","name":"主菜单","parentId":"0","url":"","icon":"","order":"1","isHeader":"1","childMenus":[
                {"id":"2","name":"商品","parentId":"1","url":"","icon":"","order":"1","isHeader":"0","childMenus":[
                    {"id":"3","name":"列表","parentId":"2","url":"{{url('goods/lists')}}","icon":"","order":"1","isHeader":"0","childMenus":[]},
                    {"id":"5","name":"添加","parentId":"2","url":"{{url('goods/create')}}","icon":"","order":"1","isHeader":"0","childMenus":[]},
                    {"id":"16","name":"热门推荐","parentId":"2","url":"{{url('goods/hot')}}","icon":"","order":"1","isHeader":"0","childMenus":[]},
                    {"id":"17","name":"猜你喜欢","parentId":"2","url":"{{url('goods/like')}}","icon":"","order":"1","isHeader":"0","childMenus":[]},
                ]},
                {"id":"4","name":"分类","parentId":"1","url":"","icon":"","order":"1","isHeader":"0","childMenus":[
                    {"id":"6","name":"分类列表","parentId":"4","url":"{{url('classify/lists')}}","icon":"","order":"1","isHeader":"0","childMenus":[]},
                ]},
                {"id":"7","name":"配置","parentId":"1","url":"","icon":"","order":"1","isHeader":"0","childMenus":[
                    {"id":"8","name":"关于我们","parentId":"7","url":"{{url('config/aboutus')}}","icon":"","order":"1","isHeader":"0","childMenus":[]},
                    {"id":"9","name":"积分规则","parentId":"7","url":"{{url('config/interule')}}","icon":"","order":"1","isHeader":"0","childMenus":[]},
                    {"id":"11","name":"APP配置","parentId":"7","url":"{{url('config/interule_rule')}}","icon":"","order":"1","isHeader":"0","childMenus":[]},
                    {"id":"12","name":"首页图片","parentId":"7","url":"{{url('config/banner')}}","icon":"","order":"1","isHeader":"0","childMenus":[]},
                    {"id":"19","name":"广告图片","parentId":"7","url":"{{url('config/b_banner')}}","icon":"","order":"1","isHeader":"0","childMenus":[]},
                ]},
                {"id":"13","name":"A进销存","parentId":"1","url":"","icon":"","order":"1","isHeader":"0","childMenus":[
                    {"id":"14","name":"销售订单","parentId":"13","url":"{{url('count/order')}}","icon":"","order":"1","isHeader":"0","childMenus":[]},
                    {"id":"20","name":"售卖商品","parentId":"13","url":"{{url('count/goods')}}","icon":"","order":"1","isHeader":"0","childMenus":[]},
                    {"id":"16","name":"分销商","parentId":"13","url":"{{url('check/businessman')}}","icon":"","order":"1","isHeader":"0","childMenus":[]},
                ]},
                {"id":"20","name":"B审核统计","parentId":"1","url":"","icon":"","order":"1","isHeader":"0","childMenus":[
                    {"id":"14","name":"销售订单","parentId":"13","url":"{{url('count/b_order')}}","icon":"","order":"1","isHeader":"0","childMenus":[]},
                    {"id":"15","name":"线下店","parentId":"14","url":"{{url('check/shop')}}","icon":"","order":"1","isHeader":"0","childMenus":[]},
                    {"id":"15","name":"商品列表","parentId":"14","url":"{{url('count/b_goods')}}","icon":"","order":"1","isHeader":"0","childMenus":[]},
                    {"id":"15","name":"查询","parentId":"14","url":"{{url('count/ask')}}","icon":"","order":"1","isHeader":"0","childMenus":[]},

                ]},
                {"id":"17","name":"升级","parentId":"1","url":"","icon":"","order":"1","isHeader":"0","childMenus":[
                    {"id":"18","name":"版本控制","parentId":"17","url":"{{url('config/version')}}","icon":"","order":"1","isHeader":"0","childMenus":[]},
                ]},
            ]
        }];
        @else
        var menu = [{"id":"1","name":"主菜单","parentId":"0","url":"","icon":"","order":"1","isHeader":"1","childMenus":[
            {"id":"2","name":"商品","parentId":"1","url":"","icon":"","order":"1","isHeader":"0","childMenus":[
                {"id":"3","name":"列表","parentId":"2","url":"{{url('goods/lists')}}","icon":"","order":"1","isHeader":"0","childMenus":[]},
                {"id":"5","name":"添加","parentId":"2","url":"{{url('goods/create')}}","icon":"","order":"1","isHeader":"0","childMenus":[]},
            ]},
            {"id":"20","name":"B统计","parentId":"1","url":"","icon":"","order":"1","isHeader":"0","childMenus":[
                {"id":"14","name":"销售订单","parentId":"13","url":"{{url('count/b_order')}}","icon":"","order":"1","isHeader":"0","childMenus":[]},
            ]},
            {"id":"14","name":"审核","parentId":"1","url":"","icon":"","order":"1","isHeader":"0","childMenus":[
                {"id":"15","name":"线下店","parentId":"14","url":"{{url('check/shop')}}","icon":"","order":"1","isHeader":"0","childMenus":[]},
            ]},
        ]
        }];
        @endif

        initMenu(menu,$(".side-menu"));
        $(".side-menu > li").addClass("menu-item");
        /*获取菜单icon随机色*/
        //getMathColor();
    });

    function iframereload(label) {
        var url = $("#"+label).attr('data-id');
        $("#"+label).attr('src', url);
    }
</script>
